#!/bin/bash

R="\\033[1;31m"
V="\\033[1;32m"
J="\\033[1;33m"
N="\\033[0;39m"

if [ $USER != "root" ]; then
	echo -n "$R"
	echo -n "Doit être lancé en tant que root."
	echo "$N"
	exit 1
fi

LOG_FILE=./mysqldiff-purge-`date +"%Y%m%d%H%M%S"`.log

touch $LOG_FILE

echo -n "Effacement complet de Mysql Diff : "

rm -rf /opt/php-factory/mysqldiff-1.5.0 &>> $LOG_FILE
rm -rf /etc/php-factory/mysqldiff-1.5.0 &>> $LOG_FILE
rm /etc/apache2/sites-enabled/mysqldiff.conf &>> $LOG_FILE

service apache2 reload
